//1.virtual base constructor
//2.immediate base constructor
//3.vptr
//4.object member's constructor
//5.itself's constructor

//in this code, virtual base class is not included.
//virutal and non virtual function is included in constructor.

#include <iostream>
using namespace std;

class A{
public:
  virtual void v(){cout<<"A::v()"<<endl;}//virtual member function
  void n(){cout<<"A::n()"<<endl;}//non virtual member function
  A(){v();n();}
};

class B : public A{
public:
  void v(){cout<<"B::v()"<<endl;}
  void n(){cout<<"B::n()"<<endl;}
  B(){v();n();}
};

int main()
{
  B b;
  return 0;
}
